package com.barneyx.mshinfoplatform.entity.common;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.gitee.sunchenbin.mybatis.actable.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlCharsetConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlEngineConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "msh_default_setting_configs", autoResultMap = true)
@TableCharset(MySqlCharsetConstant.UTF8)
@TableEngine(value = MySqlEngineConstant.MyISAM)
@Slf4j
public class DefaultSettingConfig implements Serializable {
    @TableId(value = "config_id", type = IdType.ASSIGN_ID)
    @Column(type = MySqlTypeConstant.BIGINT)
    private String ConfigId;

    @TableField("config_key")
    @Column(type = MySqlTypeConstant.CHAR)
    private String ConfigKey;


    @TableField("config_type")
    @Column(type = MySqlTypeConstant.CHAR, comment = "配制所属类型")
    private String ConfigType;


    @TableField("config_name")
    @Column(type = MySqlTypeConstant.VARCHAR)
    private String ConfigName;

    @TableField("config_value")
    @Column(type = MySqlTypeConstant.CHAR)
    private String ConfigValue;

    @TableField("config_remark")
    private String ConfigRemark;

    @TableField(value = "config_content", typeHandler = JacksonTypeHandler.class)
    @Column(type = MySqlTypeConstant.JSON)
    private JSONObject ConfigContent;
}
